<?php

namespace app\api\controller;

use app\api\model\Member;
use app\common\controller\Frontend;

class VipCard extends Frontend
{
    protected array $noNeedLogin = ['getVipCardSearch',"getVipCard"];


    public function initialize(): void
    {
        parent::initialize();
    }


    /**
     * 获取vip类型（搜索条件）
     * @throws Throwable
     */

    public function getVipCardSearch()
    {
       return json((new \app\api\model\VipCard())->getVipCardSearch($this->request_array));
    }


    /**
     * 获取vip列表
     * @throws Throwable
     */
    public function getVipCard(){
        return json((new \app\api\model\VipCard())->getVipCard());
    }


    /**
     * 获取未激活会员卡
     * @throws Throwable
     */
    public function getNoActivation(){
        return json((new \app\api\model\VipCard())->getNoActivation($this->request_array));
    }



    /**
     * 去激活
     * @throws Throwable
     */
    public function toActivation(){
        return json((new \app\api\model\VipCard())->toActivation($this->request_array));
    }


    /**
     * 我的会员卡包列表
     * @throws Throwable
     */
    public function memberVipCard(){
        return json((new \app\api\model\MemberVipCard())->memberVipCard($this->request_array));
    }


    /**
     * 取消会员卡
     * @throws Throwable
     */
    public function canelVipCard(){
        return json((new \app\api\model\MemberVipCard())->canelVipCard($this->request_array));
    }



}
